/**
 * 
 */
package com.csc.bankingsystem.core.service;

import java.security.NoSuchAlgorithmException;
import java.util.List;

import com.csc.bankingsystem.core.entity.TokenRecord;
import com.csc.bankingsystem.core.entity.UserInfo;

/**
 * Define service operation of TokenRecord
 * 
 * @author angelkid
 *
 */
public interface TokenRecordService {

	TokenRecord find(long id);

	List<TokenRecord> findAll();

	Long countAll();

	Long save(TokenRecord tokenRecord);

	void update(TokenRecord tokenRecord);

	void delete(TokenRecord tokenRecord);
	
	TokenRecord findFirstByTokenAndUserInfoId(String tokenMD5, long id);
	
	String createTokenForLoginId(String loginId) throws NoSuchAlgorithmException;
	
	void deleteTokenForLoginId(UserInfo userInfo);
}
